package com.tsvetanv.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

public class HelloWorldController extends AbstractController {

	private static final Logger logger = Logger
			.getLogger(HelloWorldController.class);

	@Override
	protected ModelAndView handleRequestInternal(HttpServletRequest arg0,
			HttpServletResponse arg1) throws Exception {
		ModelAndView modelAndView = new ModelAndView("HelloWorldPage", "msg",
				"hello world");

		// test logging
		logger.info("HelloWorldController handled the request");

		return modelAndView;
	}

}
